<nav id="navbar" class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="logo" href="{{.AppUrl}}">
                <img src="{{.AppLogo}}" style="min-width:30px;">
            </a>
        </div>
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav">
                <li {{if .IsHome}}class="active"{{end}}><a href="{{.AppUrl}}">{{i18n .Lang "home"}}</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right navbar-menu">
                {{if .IsLogin}}
                <li class="dropdown avatar">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img class="middle" src="{{.AvatarURL}}{{.User.GrEmail}}?size=48"></a>
                    <ul class="dropdown-menu">
                        <li><a href="{{.AppUrl}}admin">{{i18n .Lang "admin.admin_center"}}</a></li>
                        <li class="divider"></li>
                        <li><a href="{{.AppUrl}}settings/profile">{{i18n .Lang "auth.user_profile"}} <i class="icon icon-cog pull-right"></i></a></li>
                        <li><a href="{{.AppUrl}}logout">{{i18n .Lang "auth.logout"}} <i class="icon icon-signout pull-right"></i></a></li>
                    </ul>
                </li>
                {{end}}
            </ul>
        </div>
    </div>
</nav>